package cn.cons;

import java.util.Comparator;

/**
 * description:
 * author:zcx
 * lenovo
 * 时间：2022.02.12.15.12
 */
public class CatComparator implements Comparator<Cat> {
    @Override
    public int compare(Cat o1,Cat o2) {
        if(o1.getName().length()>o2.getName().length()){
            return 1;

        }else if(o1.getName().length()<o2.getName().length()){
            return 1;
        }else {
        return 0;}

    }
}
